Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove http_server and history_server rules #1158

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

alexeagle
Copy link
Collaborator

BREAKING CHANGE:
history_server and http_server rules are no longer built-in.

To use them, first install the http-server and/or history-server packages
Then load("@npm//http-server:index.bzl", "http_server")
(or replace with history-server, noting that the rule has underscore where the package has hyphen)
and change your templated_args attribute to args

@buildsize
Copy link

buildsize bot commented Sep 20, 2019

File name Previous Size New Size Change
release.tar.gz 1.03 MB 1.02 MB -6.67 KB (1%)

@alexeagle alexeagle force-pushed the npm_bin branch 2 times, most recently from 09a1265 to 49f1330 Compare September 20, 2019 04:43
BREAKING CHANGE:
history_server and http_server rules are no longer built-in.

To use them, first install the http-server and/or history-server packages
Then load("@npm//http-server:index.bzl", "http_server")
(or replace with history-server, noting that the rule has underscore where the package has hyphen)
@@ -706,28 +705,6 @@ def node_repositories(package_json = [], **kwargs):
symlink_node_modules = False,
)

_maybe(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🌮 🌮 🌮 🌮 🌮

`;
def ${name.replace(/-/g, '_')}(**kwargs):
if "outs" in kwargs:
npm_package_bin(tool = "@${WORKSPACE}//${pkg._dir}/bin:${name}", **kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a comment here perhaps?. why outs is the determining attribute?

also, do additionalAttributes belong in npm_package_bin? if there is a "configuration_env_vars" additional that would likely be needed in both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, additionalAttributes are here,line 1073

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the doc for this has to go somewhere new, since it's a generated macro. I'll make a new doc for all the stuff we generate into your @npm and how to use those things

Copy link
Collaborator

@gregmagolan gregmagolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gregmagolan
Copy link
Collaborator

Resolves #1156

@alexeagle alexeagle mentioned this pull request Sep 20, 2019
@alexeagle alexeagle merged commit 01fdeec into bazel-contrib:master Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants